gtk_style_context_get_junction_sides (context));
}
-static void
-gtk_css_style_render_extension (GtkCssStyle *style,
- cairo_t *cr,
- gdouble x,
- gdouble y,
- gdouble width,
- gdouble height,
- GtkPositionType gap_side)
-{
- GtkJunctionSides junction = 0;
- guint hidden_side = 0;
-
- switch (gap_side)
- {
- case GTK_POS_LEFT:
- junction = GTK_JUNCTION_LEFT;
- hidden_side = (1 << GTK_CSS_LEFT);
- break;
- case GTK_POS_RIGHT:
- junction = GTK_JUNCTION_RIGHT;
- hidden_side = (1 << GTK_CSS_RIGHT);
- break;
- case GTK_POS_TOP:
- junction = GTK_JUNCTION_TOP;
- hidden_side = (1 << GTK_CSS_TOP);
- break;
- case GTK_POS_BOTTOM:
- junction = GTK_JUNCTION_BOTTOM;
- hidden_side = (1 << GTK_CSS_BOTTOM);
- break;
- }
-
- gtk_css_style_render_background (style,
- cr,
- x, y,
- width, height,
- junction);
-
- gtk_css_style_render_border (style, cr,
- x, y, width, height,
- hidden_side, junction);
-}
-
-/**
- * gtk_render_extension:
- * @context: a #GtkStyleContext
- * @cr: a #cairo_t
- * @x: X origin of the rectangle
- * @y: Y origin of the rectangle
- * @width: rectangle width
- * @height: rectangle height
- * @gap_side: side where the gap is
- *
- * Renders a extension (as in a #GtkNotebook tab) in the rectangle
- * defined by @x, @y, @width, @height. The side where the extension
- * connects to is defined by @gap_side.
- *
- * Typical extension rendering:
- *
- * 
- *
- * Since: 3.0
- **/
-void
-gtk_render_extension (GtkStyleContext *context,
- cairo_t *cr,
- gdouble x,
- gdouble y,
- gdouble width,
- gdouble height,
- GtkPositionType gap_side)
-{
- g_return_if_fail (GTK_IS_STYLE_CONTEXT (context));
- g_return_if_fail (cr != NULL);
-
- if (width <= 0 || height <= 0)
- return;
-
- gtk_css_style_render_extension (gtk_style_context_lookup_style (context),
- cr,
- x, y, width, height,
- gap_side);
-}
-
static void
gtk_do_render_handle (GtkStyleContext *context,
cairo_t *cr,